<extend name="Common/form-ajax" />
<block name="form">
	<tr>
		<th>名称:</th>
		<td>
			<input type="text" name="title" datatype="require" tip="请填写配置中文名称">
		</td>
	</tr>
	<tr>
		<th>标识:</th>
		<td>
			<input type="text" name="name" datatype="require" tip="请填写配置英文标志">
		</td>
	</tr>
	<tr>
		<th>配置值类型:</th>
		<td>
			<select id="InputType" name="type" tip="请选择配置值的类型">
				<option value="1" >字符串</option>
				<option value="2" >长文本</option>
				<option value="3" >数值</option>
				<option value="10">选择</option>
				<option value="9" >开启关闭</option>
				<option value="11">数组参数</option>
			</select>
		</td>
	</tr>
	<tr id="InputExtra" style="display:none;">
		<th>选择参数:</th>
		<td>
			<textarea name="extra" rows="3" tip="选择参数以k:v,k:v为例">{$info.extra}</textarea>
		</td>
	</tr>
	<tr>
		<th>配置值:</th>
		<td>
			<textarea name="value" rows="3" datatype="require" tip="类型若为数组以k:v,k:v为例"></textarea>
		</td>
	</tr>
	<tr>
		<th>备注:</th>
		<td>
			<input type="text" name="remark" tip="配置的备注信息">
		</td>
	</tr>
	<tr>
		<th>分组:</th>
		<td>
			<select name="groups" tip="分组查询/修改配置">
				<option value="">不用分组</option>
				<foreach name="Think.config.CONFIG_GROUPS" key="k" item="v">
				<option value="{$k}">{$v}</option>
				</foreach>
			</select>
		</td>
	</tr>
	<tr>
		<th>模块:</th>
		<td>
			<select name="module" tip="分模块加载配置">
				<foreach name="module" key="k" item="v">
				<option value="{$v}">{$v}</option>
				</foreach>
			</select>
		</td>
	</tr>
	<tr>
		<th>模块:</th>
		<td>
			<input id="is_system_0" type="radio" name="is_system" tip="判定是否可删除" value="0" checked>
			<label for="is_system_0">模块配置</label>
			<input id="is_system_1" type="radio" name="is_system" value="1">
			<label for="is_system_1">系统配置</label>
		</td>
	</tr>
	<tr>
		<th>状态:</th>
		<td>
			<input id="status_1" type="radio" name="status" tip="判定是否会加载" value="1" checked>
			<label for="status_1">启用</label>
			<input id="status_0" type="radio" name="status" value="0">
			<label for="status_0">禁用</label>
		</td>
	</tr>
	<tr>
		<th>排序:</th>
		<td>
			<input type="text" name="sort" tip="分组查询时的排列顺序" value="0">
		</td>
	</tr>
</block>
<block name="extra">
	<script type="text/javascript">
		$('#InputType').change(function(e) {
			if($(this).val()==10){
				$('#InputExtra').show();
			}else{
				$('#InputExtra').hide();
				$('#InputExtra > td > textarea').val('');
			}
		});
	</script>
</block>